/*
Author: Maciej Oczko
Date: December 2011
*/

#include "TextureTests.h"

void TextureTests::begin()
{
	textureMgr = TextureMgr::getInstancePtr();
	if(textureMgr == 0) { textureMgr = new TextureMgr(10); }
	RHANDLE h1 = textureMgr->Load(L"C:\\Users\\Maciek\\Visual Studio Projects\\ResourceManagement_1\\ResourceManagement\\Textures\\texture1.bmp");
	RHANDLE h2 = textureMgr->Load(L"C:\\Users\\Maciek\\Visual Studio Projects\\ResourceManagement_1\\ResourceManagement\\Textures\\texture2.bmp");
	RHANDLE h3 = textureMgr->Load(L"C:\\Users\\Maciek\\Visual Studio Projects\\ResourceManagement_1\\ResourceManagement\\Textures\\texture3.bmp");
	RHANDLE h4 = textureMgr->Load(L"C:\\Users\\Maciek\\Visual Studio Projects\\ResourceManagement_1\\ResourceManagement\\Textures\\texture4.jpg");
	RHANDLE h5 = textureMgr->Load(L"C:\\Users\\Maciek\\Visual Studio Projects\\ResourceManagement_1\\ResourceManagement\\Textures\\texture5.jpg");
	RHANDLE h6 = textureMgr->Load(L"C:\\Users\\Maciek\\Visual Studio Projects\\ResourceManagement_1\\ResourceManagement\\Textures\\texture6.jpg");

	//textureMgr->Release(h4);

	//h4 = textureMgr->Load(L"C:\\Users\\Maciek\\Visual Studio Projects\\ResourceManagement_1\\ResourceManagement\\Textures\\texture5.jpg");

	RHANDLE h7 = textureMgr->Load(L"C:\\Users\\Maciek\\Visual Studio Projects\\ResourceManagement_1\\ResourceManagement\\Textures\\texture6.jpg");

	textureMgr->GetTexture(h7)->Unload();
	//textureMgr->Release(h1);
}

void TextureTests::end()
{
	if(textureMgr == 0) { begin(); }
	textureMgr->ReleaseAll();
}